import http from "@/http"
import type { Carousel } from "./carouselTable"

//获取轮播图
export const getCarouselApi = ()=>{
    return http.get("/api/carousel/get")
}
//添加轮播图
export const addCarouselApi =(parm:Carousel)=>{
    return http.post("/api/carousel/add",parm)
}
//修改轮播图
export const editCarouselApi =(parm:Carousel)=>{
    return http.post("/api/carousel/edit",parm)
}
//删除轮播图
export const deleteCarouseApi = (carouselId:string)=>{
    return http.delete(`/api/carousel/delete/${carouselId}`)
}
//获取展示的轮播图
export const getCarouselsApi =()=>{
    return http.get("/api/carousel/getList")
}